package com.boot.system.entity;

import com.boot.common.entity.BaseEntity;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Table;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * 部门实体
 */
@Getter
@Setter
@Accessors(chain = true)
@Table(value = "sys_dept")
public class SysDept extends BaseEntity {

    /**
     * 部门名称
     */
    @Column(value = "name")
    private String name;

    /**
     * 部门编码
     */
    @Column(value = "code")
    private String code;

    /**
     * 部门描述
     */
    @Column(value = "remark")
    private String remark;

    /**
     * 父节点id
     */
    @Column(value = "pid")
    private Long pid;

    /**
     * 父节点树目录
     */
    @Column(value = "tree_path")
    private String treePath;

    /**
     * 显示顺序
     */
    @Column(value = "sort")
    private Integer sort;

    /**
     * 状态 1-正常 0-禁用
     */
    @Column(value = "status")
    private Integer status;

    /**
     * 子节点
     */
    @Column(ignore = true)
    private List<SysDept> children;
}